The flow of data from one sound component to another is managed using a sound component data record. This record indicates to other sound components the format of the data that a particular component is generating, together with the location and length of the buffer containing that data. This allows other sound components to access data from that component as needed. A sound component data record is defined by the SoundComponentData data type.
typedef struct {
long flags; /*sound component flags*/
OSType format; /*data format*/
short numChannels; /*number of channels in data*/
short sampleSize; /*size of a sample*/
UnsignedFixed sampleRate; /*sample rate*/
long sampleCount; /*number of samples in buffer*/
Byte *buffer; /*location of data*/
long reserved; /*reserved*/
} SoundComponentData, *SoundComponentDataPtr;
#define kOffsetBinary 'raw '
#define kTwosComplement 'twos'
#define kMACE3Compression 'MAC3'
#define kMACE6Compression 'MAC6'
| Previous | Chapter contents | Chapter top | Section top | Next |